home *** CD-ROM | disk | FTP | other *** search
- Path: feick.HSC.Colorado.EDU!MPONIKVAR
- From: MPONIKVAR@crete.hsc.colorado.edu (Marissa )
- Newsgroups: comp.lang.c++
- Subject: PLEASE HELP !!!
- Date: Fri, 2 Feb 1996 07:44:34 UNDEFINED
- Organization: University of Colorado, Health Sciences Center
- Message-ID: <MPONIKVAR.49.0018C68C@crete.hsc.colorado.edu>
- NNTP-Posting-Host: feick.uchsc.edu
- X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #1]
-
- Please don't flame me!!!
-
- I'm having some problems with a homework assignment, I'm VERY new to C++
- programming. Could someone please help me?????
-
- The assignment:
-
- Write a program that will create a string array which will be populated at
- compile time with test case strings containing data to be processed by a
- function called atoi (Your implementation will NOT use the C library
- implementation). Your atoi function will do error detection and will also
- accept octal and hexadecimal strings like the C++ language constants. A
- status structure will be passed to the function by reference. This structure
- will contain:
- * a Boolean status flag accepting the values of FAIL or PASS, and
- * if the status is FAIL then set another integer vaiable in the structure to
- integer offset in the string at which the error occurred otherwise set the
- offset to the length of the string.
- Process a minimum of 10 test cases make sure some of them have errors. Your
- outpout to cout (in iostream.h) should include the string, the value your
- conversion computed and the contents of the status structure for each test
- case.
- Make sure your test cases test all of the functionality of the program.
-
-
- As you can imagine for someone with as little C++ programming as I've had this
- is quite overwhelming. I've asked the the professor about the string array,
- and it is to be hardcoded in to make the assignment a little easier. Could
- someone please help me???!!! I'll be eternally grateful.....
-
- Thanks in advance, please e-mail me direct!
- Marissa
-